package cn.com.cifi.mars.web.action.sys;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import cn.com.cifi.mars.bean.vo.price.FileUploadVO;
import cn.com.cifi.mars.bean.vo.sys.req.SaveOperGuideReqParam;
import cn.com.cifi.mars.bean.vo.sys.req.UpdateOperGuideReqParam;
import cn.com.cifi.mars.bean.vo.sys.rsp.OperGuideVo;
import cn.com.cifi.mars.common.bean.R;
import cn.com.cifi.mars.common.constants.VersionConstant;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

@Api(tags = {"系统管理"})
@RequestMapping("/${spring.data.rest.base-path}/{apiVersion}/sys/operGuide")
public interface ISysOperGuideController {

	@ApiOperation(value = "上传操作指引", notes = "上传操作指引")
	@PostMapping(value = "upload")
	public R<FileUploadVO> fileUpload(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
			@ApiParam(value = "上传文件", required = true) @RequestParam(value = "file", defaultValue = "") MultipartFile file);

	@ApiOperation(value = "保存上传操作指引", notes = "保存上传操作指引")
	@PostMapping(value = "add")
	public R<String> createOperGuide(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
			@RequestBody SaveOperGuideReqParam param);

	@ApiOperation(value = "查询操作指引", notes = "查询操作指引")
	@GetMapping(value = "")
	public R<OperGuideVo> getOperGuideList(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
			@ApiParam(value = "当前第几页", required = true, defaultValue = "1") @RequestParam(value = "current") String current,
			@ApiParam(value = "每页条数", required = true, defaultValue = "2") @RequestParam(value = "pageSize") String pageSize);
	
	@ApiOperation(value = "删除操作指引", notes = "删除操作指引")
	@DeleteMapping(value = "")
	public R<String> deleteOperGuide(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
			@ApiParam(value = "主键id", required = true, defaultValue = "") @RequestParam(value = "id") String id);
	

	@ApiOperation(value = "编辑上传操作指引", notes = "编辑上传操作指引")
	@PutMapping(value = "update")
	public R<String> updateOperGuide(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
			@RequestBody UpdateOperGuideReqParam param);
}
